import java.util.*;

public class Text1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        List<String> ls=new ArrayList<>();
        String str=in.nextLine();
        int left=0;
        int count=0;
        StringBuffer str2=new StringBuffer();
        while(left<str.length())
        {
            if(count==0)
            {
                //判断目前下标值是否为 ",不是就追加
                if(str.charAt(left)!='"')
                {
                    if(str.charAt(left)==' ')
                    {
                        ls.add(str2.toString());
                        str2=new StringBuffer();
                        left++;
                    }
                    else{
                        str2.append(str.charAt(left++));
                    }
                }
                else {
                    //是” ，切换开始遍历下一个元素
                    count++;
                    left++;
                    continue;
                }
            }else {
                //判断是否等于",是则跳出循环
                if(str.charAt(left)!='"')
                {
                    str2.append(str.charAt(left++));
                }else{
                    count=0;
                    left++;
                }
            }
        }
        ls.add(str2.toString());
        System.out.println(ls.size());
        for(int i=0;i<ls.size();i++)
        {
            System.out.println(ls.get(i));
        }

    }
}
